From 3943f0228d7b539d96f4045ebd7bc26210040257 Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Wed, 13 Apr 2011 09:18:10 +0100 Subject: [PATCH] Remove "uninitialized_var" macro, which doesn't work with clang. Since its only user is in ACPI parsing code, the extra overhead of initializing to 0 is not worth fighting over. Signed-off-by: Tim Deegan --- xen/drivers/acpi/tables/tbutils.c | 2 +- xen/include/xen/compiler.h | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/xen/drivers/acpi/tables/tbutils.c b/xen/drivers/acpi/tables/tbutils.c index 38581b785e..8b2dff1526 100644 --- a/xen/drivers/acpi/tables/tbutils.c +++ b/xen/drivers/acpi/tables/tbutils.c @@ -369,7 +369,7 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) u32 table_count; struct acpi_table_header *table; acpi_physical_address address; - acpi_physical_address uninitialized_var(rsdt_address); + acpi_physical_address rsdt_address = 0; u32 length; u8 *table_entry; acpi_status status; diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h index 23532ea331..ec26dded6e 100644 --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -66,10 +66,4 @@ __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ (typeof(ptr)) (__ptr + (off)); }) -/* - * A trick to suppress uninitialized variable warning without generating any - * code - */ -#define uninitialized_var(x) x = x - #endif /* __LINUX_COMPILER_H */ -- 2.30.2